import request from '@/utils/request'
export default {

  // 添加课程信息
  addCourseInfo(courseInfo) {
    return request({
      url: `/eduservice/edu-course/addCourse`,
      method: 'post',
      data:courseInfo
    })
  },

  //查询所有讲师
  getListTeacher(){
    return request({
      url: `/eduservice/edu-teacher/findAll`,
      method: 'get',
    })
  },
  //根据课程id查询课程数据
  getCourseInfo(courseId){
    return request({
      url: `/eduservice/edu-course/getCourseInfo/${courseId}`,
      method: 'get'
    })
  },

  //修改课程信息
  updateCourseInfos(coursequery){
    return request({
      url: `/eduservice/edu-course/updateCourseInfo`,
      method: 'post',
      data: coursequery
    })
  },

  //通过课程ID获得公共信息
  getPublicInfo(courseId){
    return request({
      url: `/eduservice/edu-course/getPublic/${courseId}`,
      method: 'get'
    })
  },

  //课程的最终发布
  publishCourse(id){
    return request({
      url: `/eduservice/edu-course/publishCourse/${id}`,
      method: 'post'
    })
  },

  //获取课程列表信息
  getCoursedata(current,size,eduCourse){
    return request({
      url: `/eduservice/edu-course/getCoursedata/${current}/${size}`,
      method: 'post',
      data: eduCourse
    })
  },

  //删除课程信息
  delCoursedata(CourseId){
    return request({
      url:`/eduservice/edu-course/delCourseInfo/${CourseId}`,
      method: 'delete'
    })
  }
}
